package cn.xpg.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.xpg.dao.CustomerTypeMapper;
import cn.xpg.entity.CustomerType;
import cn.xpg.service.CustomerTypeService;

@Service("customerTypeService")
public class CustomerTypeServiceImpl implements CustomerTypeService {

	@Resource(name = "customerTypeMapper")
	private CustomerTypeMapper customerTypeMapper;

	@Override
	public int addCustomerType(CustomerType customerType) {
		// TODO Auto-generated method stub
		return customerTypeMapper.addCustomerType(customerType);
	}

	@Override
	public int deleteCustomerType(int customertype_id) {
		// TODO Auto-generated method stub
		return customerTypeMapper.deleteCustomerType(customertype_id);
	}

	@Override
	public List<CustomerType> getCustomerTypeList(String customertype_name, int currentPageNo, int pageSize) {
		// TODO Auto-generated method stub
		return customerTypeMapper.getCustomerTypeList(customertype_name, currentPageNo, pageSize);
	}

	@Override
	public int getCustomerTypeCount(String customertype_name) {
		// TODO Auto-generated method stub
		return Integer.valueOf(customerTypeMapper.getCustomerTypeCount(customertype_name).toString());
	}

	@Override
	public CustomerType getCustomerTypeId(int customertype_id) {
		// TODO Auto-generated method stub
		return customerTypeMapper.getCustomerTypeId(customertype_id);
	}

	@Override
	public int updateCustomerType(CustomerType customerType) {
		// TODO Auto-generated method stub
		return customerTypeMapper.updateCustomerType(customerType);
	}

}
